package com.tedu.factory;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * 一个创建Bean对象的工厂
 */
public class BeanFactory {
    private static Properties prop;
    static {
        try {
            prop =  new Properties();
            InputStream in = BeanFactory.class.getClassLoader().getResourceAsStream("bean.properties");
            prop.load(in);
        } catch (IOException e) {
            e.printStackTrace();
            throw new ExceptionInInitializerError("初始化propertis失败");
        }
    }

}
